#ifndef __PLAYER_ENTITY_HPP__
#define __PLAYER_ENTITY_HPP__

#include <string>
#include <time.h>
#include "Entity3D.hpp"
#include "PlayerEntityStateNames.hpp"
#include "../InputEventListener.hpp"
#include "../MFSMachine.hpp"

class InputEvent;
class PlasmaCannon;

class PlayerEntity : public Entity3D, public InputEventListener
{
public:
	PlayerEntity(std::string modelName, std::string textureName, float fSpeed = 0.0f, MVector3D initPos = MVector3D(0.0f, 0.0f, 0.0f));
	~PlayerEntity();

	void setSpeed(float& fSpeed);
	void setFireRate(float& fFRate);
	void update(clock_t tick);
	void handleEvent(InputEvent* pEvent);
	bool shotAutocannon(Entity3D* pTargetEntity);

	MFSMachine<PlayerEntity, PlayerEntityStateName>*    getStateMachine();

	PlasmaCannon*  getCannon();

private:
	MFSMachine<PlayerEntity, PlayerEntityStateName>*    m_pMFSMachine;

	float   m_fSpeed;
	float   m_fFireRate;
	float   m_fAutocannonDmg;
	float   m_fHitPoints;
	float   m_fReceivedDmg;

	PlasmaCannon* m_pPCannon;
};

#endif //__PLAYER_ENTITY_HPP__

//EOF